Stereo Camera

ABSTRACT

In order to provide a small, stereo camera with stable errors of distance measurement, there are provided: an image acquisition unit that acquires plural images imaged by plural imaging units; a first region processing unit that divides each of the plural images acquired by the image acquisition unit into first regions composed of predetermined plural pixels, and measures a distance for each of the divided first regions to generate a first distance image; a target object extraction unit that extracts a target object from the distance image or the image, and extracts a second region composed of the plural first regions including the extracted target object; an error factor identification unit that extracts a predetermined representative value from the inside of the second region, compares the brightness value of an arbitrary pixel in the second region with that in a correspondence region up to the position moved from the arbitrary pixel by a disparity represented by the representative value, and determines an error factor on the basis of the comparison result; and a second region processing unit that determines a weight value on the basis of the error factor, and measures a distance for each second region using the weight value to generate a second distance image.

TECHNICAL FIELD

The present invention relates to a stereo camera that measures adistance up to an object on the basis of images imaged by using two ormore imaging elements.

BACKGROUND ART

Patent Literature 1 is one of background arts in the technical field. Anobject of Patent Literature 1 is to accurately detect plural types ofobjects. Therefore, disclosed is a stereo camera that divides an imageinto small regions, makes the small regions correspond with each otherbetween plural images on the basis of the similarity of the brightnessvalue to generate distance image data obtained by measuring distances,detects an object as one measurement target by grouping the smallregions with the measured distances closer to each other, and measuresthe distance up to the object as the average value of the distances inthe group.

Further, an object of Patent Literature 2 is to measure a distance up toan object by accurately detecting the object to be measured, as similarto Patent Literature 1. Thus, in addition to the grouping using thedistance image data, small regions in which the brightness values ofadjacent pixels are closer to each other in one image are grouped.Accordingly, disclosed is a stereo camera that can reliably detect anobject as one measurement target to measure the distance up to theobject as the average value of the distances in the group on theassumption that adjacent brightness values are not largely changed inthe same object even in the case where the small regions cannot begrouped due to irregularities of the measured distances caused by theinfluence of the sizes of the small regions and division positions inspite of the same object.

CITATION LIST Patent Literature

Patent Literature 1: Japanese Unexamined Patent Application PublicationNo. 2008-45974

Patent Literature 2: Unexamined Patent Application Publication No.2011-128756

SUMMARY OF INVENTION Technical Problem

A stereo camera that measures the distance and velocity of an object isapplied to automobiles, construction machines, robots, and the like, andthe distance and velocity up to an object in the vicinity are accuratelymeasured, so that the stereo camera is used for realizing a drive assistsystem such as collision avoidance and recognition of self-location.

In the principle of distance measurement by the stereo camera thatmeasures a distance up to an object on the basis of images imaged byusing two or more cameras, the object images are allowed to match eachother for correspondence using the images of the object for measurementimaged by the plural cameras, and the distance is computed by theprinciple of triangulation on the basis of the relation between theimaged position and the camera-mounted position. Therefore, shifting ofthe correspondence position results in an error of distance measurement.

There are three main error factors of distance measurement. The firstfactor is caused by imaging another object entering before an object tobe measured. Specifically, water droplets and stains adhere to a cameralens or a clear panel provided on the front side of the camera, orraindrops enter, bugs fly, or leaves fall between the camera and anobject to be measured. In the case where the stereo camera is used inharsh environments, it is necessary to respond to the error factor. Ifanother object is imaged, an error largely occurs in the correspondenceposition. In order to minimize the error of distance measurement, anobject of the present invention is to make images correspond with eachother by removing pixels in which an object that is not a measurementtarget is imaged.

The second factor is caused by the size of an image region at the timeof correspondence. If the size of the image region is small, thecorrespondence position is shifted by the influence of noise of animaging element, or the correspondence position is shifted due to wrongcorrespondence with a region in the vicinity where patterns are similar.Therefore, in order to minimize the error of distance measurement, anobject of the present invention is to makes correspondence by matchingimages of the entire object using a large region mostly occupied by thetarget object for measurement.

The third factor is caused by imaging a background around an object tobe measured. The background corresponds to an object located far fromthe object to be measured, and thus an error occurs when the backgroundis included in the correspondence region. Therefore, in order tominimize the error of distance measurement, an object of the presentinvention is to make images correspond with each other by removingpixels in which an object that is not a measurement target is imaged, assimilar to the first factor.

Accordingly, in order to realize a small stereo camera with stableerrors of distance measurement, a region in which an object that is nota measurement target is imaged needs to be removed on a pixel basis. Inaddition, it is necessary to make images correspond with each otherusing a large region containing the entire target object formeasurement.

On the contrary, an object of the system of Patent Literature 1 is todetect an object unlike the aim of the present invention the object ofwhich is to perform distance measurement with a small error. Therefore,the distance is measured on a small region basis, and an object that isnot a measurement target is removed on a small region basis. Thus, theerror of distance measurement may become large in some cases. Further, ahistogram is generated by dividing with arbitrary segments such asseparation in the vertical direction. Thus, many different objects arecontained in the histogram other than the object to be measured.Further, when raindrops and stains that are the first error factors arecontained, the representative value cannot be stably extracted in somecases. Thus, the problem of the present invention cannot be solved.

In addition, an object of the system of Patent Literature 2 is to detectan object unlike the aim of the present invention the object of which isto perform distance measurement with a small error. There is a smallregion that is properly determined as the same object as compared toPatent Literature 1. However, the system of Patent Literature 2 has thesimilar nature as that of Patent Literature 1. Thus, the problem of thepresent invention cannot be solved.

Accordingly, the present invention solves the above-described problems,and an object thereof is to provide a small stereo camera with stableerrors of distance measurement.

Solution to Problem

In order to solve the problem, a stereo camera of the present inventionis configured to include: an image acquisition unit that acquires pluralimages imaged by plural imaging units; a first region processing unitthat divides each of the plural images acquired by the image acquisitionunit into first regions composed of predetermined plural pixels, andmeasures a distance for each of the divided first regions to generate afirst distance image; a target object extraction unit that extracts atarget object from the distance image or the image, and extracts asecond region composed of the plural first regions including theextracted target object; an error factor identification unit thatextracts a predetermined representative value from the inside of thesecond region, compares the brightness value of an arbitrary pixel inthe second region with that in a correspondence region up to theposition moved from the arbitrary pixel by a disparity represented bythe representative value, and determines an error factor on the basis ofthe comparison result; and a second region processing unit thatdetermines a weight value on the basis of the error factor, and measuresa distance for each second region using the weight value to generate asecond distance image.

Advantageous Effects of Invention

According to the present invention, it is possible to provide a smallstereo camera with stable errors of distance measurement.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a diagram for showing an embodiment of a system configurationof a stereo camera according to the present invention.

FIG. 2 is a diagram for showing image examples acquired by imageacquisition means of the present invention.

FIG. 3 is a diagram for showing a processing conceptual example in smallregion processing means of the present invention.

FIGS. 4A and 4B are diagrams each showing a processing conceptualexample in target object extraction means of the present invention.

FIG. 5 is a diagram for showing a processing conceptual example in errorfactor identification means of the present invention.

FIG. 6 is a diagram for showing a processing conceptual example in largeregion processing means of the present invention.

FIG. 7 is a diagram for showing experimental results by the stereocamera of the present invention.

DESCRIPTION OF EMBODIMENTS

Hereinafter, as an example of a preferred embodiment, a stereo cameraaccording to the present invention that solves the problem will bedescribed on the basis of the drawings.

First Embodiment

In the embodiment, in order to stably minimize errors of distancemeasurement even when an image contains raindrops and stains 214 and thelike, an example of a stereo camera capable of realizing a process ofextracting a target object as one large region and a process of removingerror factors on a pixel basis will be described.

FIG. 1 shows an example of a system configuration diagram of the stereocamera according to the embodiment, and the details thereof will bedescribed below using reference numerals. A stereo camera processingdevice 100 includes image acquisition means 110, small region processingmeans 112, target object extraction means 114, error factoridentification means 116, and large region processing means 118.

Further, images imaged by cameras 150 that are two or more imaging unitsare input to the stereo camera processing device 100, and processingresults are output to a control device 160 that uses distanceinformation of an object measured by the stereo camera. It should benoted that although not shown in the drawing, each means is realizedusing computing devices such as various computers (Central ProcessingUnit, Micro-Processing Unit, Digital Signal Processor, ApplicationSpecific Integrated Circuit, Field-Programmable Gate Array, and thelike) and a memory mounted in the stereo camera processing device 100.The present invention can be carried out while the image informationfrom two or more cameras 150 is not limited to any type of, for example,color information, monochrome information or infrared information.

The control device 160 is suitable for, for example, a motion controllerfor an automobile, a construction machine, or a mobile robot or aninspection device in dusty or liquid scattering environment. Inaddition, if the present invention is applied to a control device inwhich stains, raindrops, or liquid is generated on a camera lens or aclear panel on the front side of a camera, errors of the measureddistance can be minimized and stability and reliability can be improved.

Further, although not shown in the drawing, in the process in the stereocamera processing device 100, a process of correcting lens distortion ora parallelizing process for images obtained from the image acquisitionmeans 110 may be performed as preprocessing, and a filtering process forstabilization and high accuracy may be performed for the distance,velocity, or acceleration (each of which is a relative value or anabsolute value) measured as processing results output to the controldevice 160 and results of recognition, sense, detection of the targetobject as post-processing.

Hereinafter, the small region processing means 112, the target objectextraction means 114, the error factor identification means 116, and thelarge region processing means 118 configuring the stereo cameraprocessing device 100 will be described in detail using FIG. 2 to FIG.6.

FIG. 2 shows image examples obtained by the image acquisition means 110configuring the stereo camera processing device 100, and the exampleswill be described using reference numerals.

The image acquisition means 110 obtains plural images imaged by thecameras 150 that are plural imaging units.

Among left image examples 200 and 204 and right image examples 202 and206 to be obtained, a pair of the image example 200 and the imageexample 202 contains no raindrops and stains. If a large region can beproperly extracted for a target object 208 for measurement contained inthe image example 200 as an image region 210 used for correspondence, acorrespondence position (disparity between images) 212 with a smallerror can be obtained in the image example 202.

As a concrete correspondence method, any one of general correspondencemethods (Sum of Abusolute Difference, Sum of Suquared Difference,Normalized Cross-Correspondence, Phase-Only Correspondence,Lucas-Kanade, and the like) in an image process may be used.

On the contrary, in the case where the raindrops and stains (that arenot measurement target objects) 214 are contained as in a pair of theleft image example 204 and the right image example 206, if theabove-described general method of the image process is applied as it is,the correspondence position 212 is shifted as shown in the drawing.Thus, errors occur in the measured distance and velocity. In this case,the present invention is advantageous because the errors of the measureddistance can be minimized.

FIG. 3 is a processing conceptual diagram of the small region processingmeans 112 configuring the stereo camera processing device 100, and thediagram will be described using reference numerals.

The small region processing means 112 that is a first region processingunit divides each of plural images obtained by the image acquisitionmeans 110 into small regions 300 that are first regions composed ofpredetermined plural pixels, and measures the distance of each dividedfirst region to generate a distance image 304 that is a first distanceimage.

Specifically, the small region processing means 112 divides the leftimage example 204 into small regions having a predetermined fixed size.It should be noted that the definition of the small region will bedescribed later.

Using the correspondence method, a small region that is a correspondenceposition in the image example 206 corresponding with each small regionof the image example 204 is obtained.

As an example, the small region as the correspondence position in theright image example 206 corresponding with an arbitrary small region 300in the left image example 204 is a small region 302. The distance image304 (first distance image) can be obtained as a set of measureddistances for the small regions. Although not shown in the drawing, thedistance image 304 has the result of distance measurement for each smallregion, and includes various results such as small and large measurementerrors.

The size of each small region needs to be empirically determined on thebasis of the number of pixels and the angle of view of the camera. Ifthe region is too small, noise by caused by the imaging element affectsand wrong correspondence with a similar region in the vicinitydisadvantageously occurs. If the region is too large, plural objectsother than the target object for measurement are likely to be contained.Thus, the number of measurement results with small errors isdisadvantageously reduced. In consideration of these problems, eachsmall region is composed of plural pixels. Specifically, each smallregion is set as (a few pixels)×(a few pixels) to (tens of pixels)×(tensof pixels). Further, the fixed size of the small region has beendescribed above. However, the size may vary depending on situations suchas the degree of noise, or the most appropriate size may be selected onthe basis of the tendency of distances measured by testing plural sizes.

FIGS. 4 are processing conceptual diagrams of the target objectextraction means 114 configuring the stereo camera processing device 100that is a processing unit, and the diagrams will be described usingreference numerals.

The target object extraction means 114 extracts the target object 208from the distance image 304 obtained by the small region processingmeans 112 that is the first region processing unit or from one image,and extracts a large region 306 that is a second region composed ofplural first regions (small regions 300) containing the extracted targetobject 208.

Specifically, the target object extraction means 114 extracts the largeregion 306 composed of plural small regions containing the target objectfor measurement as one block. As shown in FIG. 4( a), one solid objectmay be extracted by grouping the distance image 304 generated by thesmall region processing means 112. As shown in FIG. 4( b), one solidobject may be extracted by grouping on the basis of the similarity ofcolors (monochrome, color, infrared rays, or the like) of images betweenadjacent pixels from the image example 204. In the case where the imagepattern of the target object for measurement is fixed, a method ofrecognizing, sensing, and detecting may be used using a general amountof characteristics and a discriminator in an image process. In order tominimize the errors of measurement of distances, any case of extractingas the large region containing the target object using any one of themethods can be applied to the present invention.

FIG. 5 is a processing conceptual diagram of the error factoridentification means 116 configuring the stereo camera processing device100, and the diagram will be described below using reference numerals.It should be noted that processing steps are configured in the order ofarrows.

The error factor identification means 116 extracts a predeterminedrepresentative value 502 from the inside of the second region (largeregion 306) extracted by the target object extraction means 114, andcompares the brightness value of an arbitrary pixel 504 in the secondregion with that in a correspondence region 506 up to the position movedfrom the arbitrary pixel 504 by the disparity represented by therepresentative value 502. On the basis of the comparison result, theerror factor is determined. Specifically, if the difference between thebrightness values is a predetermined threshold value or larger, it isdetermined as an error factor. If the difference is smaller than thethreshold value, it is not determined as an error factor. As an example,after extracting the representative value 502, it is determined whetheror not the peak value of a frequency histogram 500 is a predeterminedthreshold value or larger, or the ratio or difference between the peakvalue and the second or following peak value is the threshold value orlarger.

Specifically, the error factor identification means 116 creates thefrequency histogram 500 for the measured values of the distance image304 that is the first distance image inside the large region 306 that isthe second region containing the target object 208 extracted by thetarget object extraction means 114. The horizontal axis of the frequencyhistogram 500 desirably represents a disparity as a unit, but may be adistance. The peak value is extracted from the frequency histogram 500as the representative value 502. The representative value 502 indicatesa disparity (or distance) up to the target object for measurement. Thepeak of the frequency histogram is extracted, so that the raindrops andstains 214 hardly affect. In addition, the distance image 304 used forgenerating the frequency histogram is limited to the inside of the largeregion 306, so that the peak indicating the target object formeasurement can be stably extracted even in the case where the raindropsand stains 214 are contained due to the high frequency of the targetobject for measurement in the entire information. However, the distanceup to the target object for measurement obtained using therepresentative value 502 corresponds to that obtained for each smallregion 300, and thus the error is large. Accordingly, the problem of thepresent invention cannot be solved in this stage. Further, in order toconfirm that the peak can be stably obtained, the second largest peakvalue existing in a range apart from the representative value 502 by acertain value or larger on the horizontal axis of the frequencyhistogram is extracted. On the basis of the ratio or difference betweenthe two peaks, in the case where the ratio or difference between the twopeaks is a predetermined threshold value or larger, namely, in the casewhere the next peak value exceeds the threshold value set by the largestpeak (the representative value 502 (largest peak) is extremely high ascompared to the others), the stability is determined so as to be stable,and whether or not other objects that are difficult to remove arecontained in the extracted large region may be determined. Further, inthe vote of the value of the distance image 304 when generating thefrequency histogram 500, the Gaussian Filter may be overlapped, so thatthe representative value 502 can be stably obtained.

Next, the following process is performed for each pixel inside the largeregion 306 containing the target object.

The arbitrary pixel 504 in the large region 306 existing in the leftimage example 204 is not located at the same position in the right imageexample 206, but is located around the position moved by the disparityrepresented by the representative value 502.

Accordingly, it is conceivable that the arbitrary pixel 504 of the leftimage example 204 corresponds with the correspondence region 506 inconsideration of an error range included in the representative value 502from the position moved by the representative value 502 on the rightimage example 206 obtained by another camera. If both of the arbitrarypixel 504 and the correspondence region 506 are not affected by theraindrops and stains 214, the brightness value of the arbitrary pixel504 matches the range of the brightness value of the correspondenceregion 506 (the former is included inside the latter). On the contrary,if either the arbitrary pixel 504 or the correspondence region 506 isaffected by the raindrops and stains 214, contradiction occurs so thatthe brightness values do not match each other (the former is includedoutside the latter) as shown in FIG. 5.

The unmatched pixel results in an error when the correspondence positionis computed among plural images in the entire large region 306containing the target object, and thus may be removed in accordance withthe degree of matching. It should be noted that if the error generatedin the representative value 502 is an integer, the correspondence region506 is composed of integer pixels. If the error includes a decimalnumber, the intermediate brightness value may be generated or thedecimal number may be rounded up to an integer on the basis of theconcept of the linear interpolation. Further, even in the case whereplural images are not parallelized, the correspondence region 506 may becomputed in an interpolation process. It should be noted that if theoffset error of the brightness between the image example 204 and theimage example 206 is so large that it cannot be ignored in computation,the offset value may be computed and subtracted in an additional processin the range of the large region 306 containing the target object 208 onthe assumption that the pixel corresponds with the position shifted bythe representative value 502. Further, in the case where the errorvariation in the brightness value of each pixel is so large that itcannot be ignored in computation, the error variation assumed on thebasis of the matching degree of brightness may be subtracted in anadditional process.

FIG. 6 is a processing conceptual diagram of the large region processingmeans 118 configuring the stereo camera processing device 100, and thediagram will be described below using reference numerals.

The large region processing means 118 that is a second region processingunit determines a weight value on the basis of the error factoridentified by the error factor identification means 116, and measures adistance for each large region that is the second region using theweight value to generate a second distance image. In this case, if theresult of determination by the error factor identification means 116shows that the peak value of the frequency histogram 500 is apredetermined threshold value or larger, or the ratio or differencebetween the peak value and the second or following peak value is thethreshold value or larger, the weight value is set smaller as comparedto the pixel smaller than the threshold value, or the pixel having thethreshold value or larger is deleted.

Specifically, the large region processing means 118 makes the largeregion 306 of the left image example 204 correspond with the right imageexample 206 as one block, and computes the disparity, so that thedistance up to the target object 208 is derived. The small regionprocessing means 112 derives the distance while making correspondencewith each small region. On the contrary, the distance can be stably andaccurately derived because the amount of information is increased bymaking the large region 306 correspond as one block. The large region306 contains pixels of error factors that deteriorate the accuracy ofdistance measurement, and information of the error factors based on thedifference of the brightness value of each pixel between the right andleft images extracted by the error factor identification means 116 isidentified. Thus, the distance of the large region 306 is derived usingthe information.

Specifically, in a computation process in which a disparity thatminimizes or maximizes an evaluation value e with a correspondencefunction f is searched for correspondence for each point p in the rangeof all pixels Σ in the large region 306, the information of errorfactors is represented as a coefficient of a weight value W whene=Σ(f(p)W(p)). In the search of the minimum or maximum value, variousmethods of image processing can be applied. As an example, “Sum ofSquared Difference” is applied to the correspondence function f, and theevaluation value e may be computed around the position where the largeregion 306 is moved by the disparity of the representative value 502 toextract the minimum value. The weight value W is determined on the basisof the difference of the brightness value of each pixel between the leftimage example 204 and the right image example 206 computed by the errorfactor identification means 116. In the case where the evaluation valuee is minimized, the weight value W is increased when the difference ofthe brightness value is small. In the case where the evaluation value eis maximized, the weight value W is decreased when the difference of thebrightness value is small. For example, the weight value W may bedetermined so as to be decreased in proportion to the difference betweenthe brightness value of the arbitrary pixel 504 and the range of thebrightness values of the correspondence region 506, or usage of eachpixel may be determined while setting a threshold value to thedifference of the brightness value.

When a distance up to the target object 208 is derived using the leftimage example 204 and the right image example 206, the influence of thepixels of error factors can be minimized by applying the above-describedcomputation. In addition, the large region 306 corresponds as one block,so that stable and accurate computation with much information can becarried out.

Further, the large region processing means 118 that is the second regionprocessing unit that generates a weight alignment 600 by aligning theweight values W as similar to the pixel alignment of the image to beused for weight adjustment of each pixel in the computation ofevaluation values of each recognition/extraction/measurement process inimage processing generates the weight alignment 600 in the large region306 on the basis of the difference of the brightness value that is theerror factor determined by the error factor identification means 116,and measures a distance for each large region 306 using the weightalignment 600 to generate the second distance image, so that theperformance can be improved because the influence of the error factorcan be suppressed.

It should be noted that as shown by the dashed arrow returned from thelarge region processing means 118 to the error factor identificationmeans 116 in FIG. 1, the disparity (correspondence position or distance)having a small error with the influence of the raindrops and stains 214removed can be obtained after the operation by the large regionprocessing means 118. Thus, the error factor identification means 116 isoperated again using the disparity having a small error, so thatinformation other than the target object 208 for measurement that is alarge error factor such as the raindrops and stains 214 and other thanthe target object 208 for measurement that is a small error factor maybe removed or the weight thereof may be reduced to realize the highaccuracy. Specifically, the background information existing around thetarget object 208 for measurement corresponds to this. The informationcannot be identified because the error of the representative value 502is large in the error factor identification means 116 for the firsttime. However, the information can be identified using the disparityhaving a small error. Further, the process repeatedly performed by theerror factor identification means 116 may be looped plural times torealize the high accuracy.

FIG. 7 shows an experimental result for confirming the effect of thepresent invention, and the result will be described below usingreference numerals.

As experimental conditions, using a stereo camera mounted in a car (owncar) that was stopping, the distance of another car (car ahead) that wasstopping about 30 m ahead was measured as the target object 208 formeasurement, and a windshield located in front of the stereo camera waswetted with a spray.

In the graph of FIG. 7, in the case where the present invention was notapplied (without the present invention), a maximum error of about ±5 moccurred in the measured distance due to the influence of the waterdroplets. However, in the case where the present invention was applied(with the present invention), the error of the measured distance wassuppressed to a maximum error of about ±1 m. Accordingly, even in thecase where an image contains the raindrops and stains 214, a stereocamera with a small error of the measured distance can be realized byapplying the present invention.

The embodiment has been described as a monochrome image by using onlythe brightness value of the image. However, the concept of the presentinvention can be similarly applied to a color image and an infraredimage in the expression of each color. Further, the embodiment has beendescribed using two images of the image example 204 and the imageexample 206. However, the concept of the present invention can beapplied to a case in which a geometric relation between two or moreimages and the position and posture of a camera that imaged the imagescan be obtained.

As a representative example to which the embodiment is applied, there isa stereo camera that is mounted in a car to realize a drive assistfunction. The stereo camera in this case mainly uses cars or pedestriansin the vicinity as the target objects 208 for measurement. However, inorder to control the movement of the car and the target object 208 formeasurement, a relative velocity is measured in some cases. When therelative velocity is measured, there is a computation method on thebasis of the current relative distance and the enlargement/reductionratios of the current and past view angles, in addition to a computationmethod in which the difference between the current relative distance andthe past relative distance is divided by the measurement interval. Evenin the case of computing the enlargement/reduction ratios, the weightalignment 600 created by the large region processing means 118 of thepresent invention is used as a coefficient for computation of eachpixel. Namely, the relative velocity is computed using the weight valuesor the weight alignment 600 obtained by aligning the weight values, sothat the influence of pixels as the error factors may be reduced torealize the high accuracy.

Further, when computing the enlargement/reduction ratios, for example,in the case where the weight alignment is additionally created inaccordance with the size of the brightness gradient for correcting acontribution ratio in the computation of each pixel, the weightalignment 600 created by the large region processing means 118 may beused together.

Second Embodiment

Hereinafter, plural embodiments that are different from the firstembodiment and that achieve the object in the same way as or moreeffectively than the first embodiment of the present invention will bedescribed. The embodiment is different from the first embodiment in thefollowing points, but is basically the same as the first embodiment inthe other points. Thus, overlapped explanations will be omitted.

In the first embodiment, the stereo camera that minimizes the errors ofthe measured distance even in the case where raindrops and stains arecontained in an image has been described. However the performance can beimproved in recognition (sensing or detection) of the target object formeasurement using the similar concept.

Therefore, configured is a process shown by the dashed arrow returnedfrom the large region processing means 118 to the target objectextraction means 114 of FIG. 1.

The target object 208 for measurement is extracted as one large regionby the target object extraction means 114 for the first time. In thiscase, it is necessary to determine whether or not the large regioncorresponds to an object measured by the system. In the firstembodiment, the large region is extracted in accordance with aconventional procedure in which the influence of the raindrops andstains 214 is not eliminated. Thus, the target object extraction means114 fails to extract the large region due to the influence of theraindrops and stains 214, or erroneous recognition occurs in some cases.On the contrary, the threshold value for the determination is eased inthe target object extraction means 114 for the first time, and theoperation is performed to the step of the large region processing means118.

Further, the target object extraction means 114 can determine whether ornot the large region corresponds to an object to be measured by thesystem for the second time after pixels other than the target object 208for measurement are removed by using the weight alignment 600 obtainedby the large region processing means 118 as the contribution ratio inthe computation of each pixel. The error factors are removed by thetarget object extraction means 114 for the second time. Thus, even ifthe threshold value for the determination is strictly set, thedetermination can be made without a mistake. Therefore, the performanceof extracting the target object for measurement can be improved.

LIST OF REFERENCE SIGNS

100 stereo camera processing device

110 image acquisition means

112 small region processing means

114 target object extraction means

116 error factor identification means

118 large region processing means

150 camera

160 control device

200, 202, 204, 206 image example

208 target object

210 image region

212 correspondence position

214 raindrops and stains

300 small region

302 small region

304 distance image

306 large region

500 frequency histogram

502 representative value

504 arbitrary pixel

506 correspondence region

600 weight alignment

1. A stereo camera comprising: an image acquisition unit that acquiresplural images imaged by plural imaging units; a first region processingunit that divides each of the plural images acquired by the imageacquisition unit into first regions composed of predetermined pluralpixels, and measures a distance for each of the divided first regions togenerate a first distance image; a target object extraction unit thatextracts a target object from the distance image or the image, andextracts a second region composed of the plural first regions includingthe extracted target object; an error factor identification unit thatextracts a predetermined representative value from the inside of theextracted second region, compares the brightness value of an arbitrarypixel in the second region with that in a correspondence region up tothe position moved from the arbitrary pixel by a disparity representedby the representative value, and determines an error factor on the basisof the comparison result; and a second region processing unit thatdetermines a weight value on the basis of the error factor, and measuresa distance for each second region using the weight value to generate asecond distance image.
 2. The stereo camera according to claim 1,wherein the error factor identification unit generates a frequencyhistogram using the distance image, and extracts the peak value of thefrequency histogram in the extracted second region as the representativevalue.
 3. The stereo camera according to claim 2, wherein the errorfactor identification unit determines, after extracting therepresentative value, whether or not the peak value is a predeterminedthreshold value or larger or the ratio or difference between the peakvalue and the second or following peak value is the threshold value orlarger, and in the case where the result determined by the error factoridentification unit shows that the peak value is the predeterminedthreshold value or larger or the ratio or difference between the peakvalue and the second or following peak value is the threshold value orlarger, the second region processing unit sets the weight value smalleras compared to the pixel smaller than the threshold value, or deletesthe pixel having the threshold value or larger.
 4. The stereo cameraaccording to claim 1, wherein the second region processing unitgenerates a weight alignment in the second region on the basis of thedifference of the brightness value that is the error factor determinedby the error factor identification unit, and measures a distance foreach second region using the weight alignment to generate the seconddistance image.
 5. The stereo camera according to claim 1, wherein arelative velocity is computed using the weight value.